import HyRequest from "@/service";
// 详细订单接口
enum OrderAPI {
  getReviewOrder = "/Orders/getReviewOrder",
  reviewOrders = "/Orders/reviewOrders",
  orderLimit = "/Orders/orderLimit",
  total = "Orders/count",
  reviewOrder = "/Orders/removeGetReviewOrder"
}
export function reqGetOrder() {
  return HyRequest.get<any>({
    url: OrderAPI.getReviewOrder
  });
}
// 订单审核
export function reqReviewOrders(data: any) {
  return HyRequest.put<any>({
    url: OrderAPI.reviewOrders,
    data
  });
}
// 订单列表
export function reqGetOrderLimit({ pageNo, pageSize }: any) {
  return HyRequest.get<any>({
    // start=1&end=5
    url: `${OrderAPI.orderLimit}?start=${pageNo}&end=${pageSize}`
  });
}
// 订单总数
export function reqGetTotal() {
  return HyRequest.get<any>({
    url: OrderAPI.total
  });
}

export function reqRefreshOrder() {
  return HyRequest.get<any>({
    url: OrderAPI.reviewOrder
  });
}
